<?php

use think\facade\Route;
use app\admin\middleware\LoginMiddleware;
use app\admin\middleware\AuthMiddleware;
use app\admin\middleware\OperationLog;

Route::group('file', function () {
    //文件列表
    Route::get('lists', 'file.File/lists');
    //文件移动
    Route::post('move', 'file.File/move');
    //重命名文件
    Route::post('rename', 'file.File/rename');
    //删除文件
    Route::delete('delete', 'file.File/delete');
    //文件分类列表
    Route::get('listCate', 'file.File/listCate');
    //增加文件分类
    Route::post('addCate', 'file.File/addCate');
    //编辑文件分类
    Route::post('editCate', 'file.File/editCate');
    //删除文件分类
    Route::delete('delCate', 'file.File/delCate');
})->middleware([
    LoginMiddleware::class,
    AuthMiddleware::class,
    OperationLog::class
]);

Route::group('download', function () {
    //文件导出
    Route::get('export', 'file.Download/export');
    //文件导出进度
    Route::get('exportProgress', 'file.Download/exportProgress');
})->middleware([
    LoginMiddleware::class,
    AuthMiddleware::class
]);